package cn.neusoft.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = {"handler"})  // 处理mybatis懒加载导致返回前端数据时json序列化出错的问题
public class Operator implements Serializable {
    private String operator_id;

    private String operator_name;

    private String operator_account;

    private String operator_password;

    private String tel;

    private Integer role_id;

    private Long dept_id;

    private String sex;

    private String avatar;

    private String status;

    private String del_flag;

    private String login_ip;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 处理响应
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 处理请求
    private Date login_date;

    private String create_by;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 处理响应
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 处理请求
    private Date create_time;

    private String update_by;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 处理响应
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 处理请求
    private Date update_time;

    private String remark;

    private String dept_name;
}